package cn.zyq.ykb.beans.task;

import cn.zyq.ykb.beans.task.vo.TaskPackageVo;
import cn.zyq.ykb.system.common.BaseBean;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.*;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.List;

/**
 * 任务包对象 taskPackage
 *
 * @author SystemAuth
 * @date 2023-06-01
 */
@Data
@Entity
@Table(name = "`taskPackage`")
@JsonInclude(value = JsonInclude.Include.NON_NULL)
public class TaskPackage  extends BaseBean implements Serializable {
    /**
     * 主键id，用于关联
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY, generator = "JDBC")
    @Column(name = "`taskPackageID`")
    @ApiModelProperty("主键id，用于关联")
    private Integer taskPackageID;
    /**
     * 包名
     */
    @Column(name = "`packageName`")
    @ApiModelProperty("包名")
    private String packageName;
    /**
     * 状态（0下线，1上线）
     */
    @Column(name = "`state`")
    @ApiModelProperty("状态（0下线，1上线）")
    private Integer state;

    @Transient
    @ApiModelProperty("任务包统计")
    private TaskPackageVo taskPackageVo = new TaskPackageVo();

    @Transient
    @ApiModelProperty("任务包详情")
    private List<Task> tasks;
}
